import { Component, OnInit, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-add-item',
  templateUrl: './add-item.component.html',
  styles: [
  ]
})

export class AddItemComponent implements OnInit {

  todo: string = ''
  @Output() todoAdd = new EventEmitter<string>();

  constructor() { }

  ngOnInit(): void {
  }

  addTodo () {
    this.todoAdd.emit(this.todo);
  }
}
